package com.flyme.module.exam.provider.controller;


import com.flyme.common.core.model.ResultBody;
import com.flyme.core.base.supper.controller.BaseController;
import com.flyme.module.exam.client.api.BusAbiltityRemoteService;
import com.flyme.module.exam.client.entity.BusAbility;
import com.flyme.module.exam.provider.service.BusAbiltityService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;


@Slf4j
@Api(tags = "测评管理")
@RestController
public class BusAbiltityController extends BaseController<BusAbiltityService, BusAbility> implements BusAbiltityRemoteService {

    /**
     * 获取测评信息
     *
     * @param id
     * @return
     */
    @ApiOperation(value = "获取角色信息", notes = "获取测评信息")
    @Override
    public ResultBody get(@PathVariable Long id) {
        BusAbility result = bizService.getById(id);
        return ResultBody.success(result);
    }

    @Override
    public ResultBody update(BusAbility ability) {
        boolean result= bizService.saveOrUpdate(ability);
        return ResultBody.success(result);
    }
}
